import axios from '@/axios'

export const getGroup = data => (
  axios({
    url: '/group',
    data,
    method: 'post'
  })
)

export const getEmployee = data => (
  axios({
    url: '/employee',
    data,
    method: 'post'
  })
)

export const makeCall = data => (
  axios({
    url: '/makecall',
    data,
    method: 'post'
  })
)

export const getPoll = data => (
  axios({
    url: '/poll',
    params: data,
    method: 'get'
  })
)

export const clearCall = data => (
  axios({
    url: '/clearcall',
    data,
    method: 'post'
  })
)

export const getRecord = data => (
  axios({
    url: '/record',
    data,
    method: 'post'
  })
)

export const getSmsflow = data => (
  axios({
    url: '/smsflow',
    data,
    method: 'post'
  })
)

export const getDetailsmsrecord = data => (
  axios({
    url: '/detailsmsrecord',
    data,
    method: 'post'
  })
)

export const getVideoGroup = data => (
  axios({
    url: '/videogroup',
    data,
    method: 'post'
  })
)

export const getVideo = data => (
  axios({
    url: '/video',
    data,
    method: 'post'
  })
)

export const getCallrecord = data => (
  axios({
    url: '/callrecord',
    data,
    method: 'post'
  })
)

export const getFilelist = () => (
  axios({
    url: '/fileflow/filelist',
    data: {},
    method: 'get'
  })
)

export const ttsfile = data => (
  axios({
    url: `/ttsfile`,
    params: { content: data },
    method: 'get'
  })
)

export const smsrecord = data => (
  axios({
    url: '/smsrecord',
    data,
    method: 'post'
  })
)

export const getSmslist = data => (
  axios({
    url: '/smslist',
    data,
    method: 'post'
  })
)

export const getFileflow = data => (
  axios({
    url: '/fileflow',
    data,
    method: 'post'
  })
)

export const getMeetinfo = () => (
  axios({
    url: '/meetinfo',
    data: {},
    method: 'post'
  })
)

export const clearConnection = data => (
  axios({
    url: '/clearconnection',
    data,
    method: 'post'
  })
)

export const delFile = data => (
  axios({
    url: `/fileflow/${data}`,
    method: 'delete'
  })
)

export const getSmsgroup = data => (
  axios({
    url: '/smsgroup',
    data,
    method: 'post'
  })
)

export const getOperatorMember = data => (
  axios({
    url: '/operator',
    data,
    method: 'post'
  })
)

export const getMeetmember = data => (
  axios({
    url: '/meetmember',
    data,
    method: 'post'
  })
)

export const getDuty = data => (
  axios({
    url: '/duty',
    data,
    method: 'post'
  })
)

export const getModuleconf = data => (
  axios({
    url: '/moduleconf',
    data,
    method: 'get'
  })
)

export const updateModuleconf = data => (
  axios({
    url: '/moduleconf',
    data,
    method: 'patch'
  })
)

export const addModuleconf = data => (
  axios({
    url: '/moduleconf',
    data,
    method: 'post'
  })
)

export const delModuleconf = data => (
  axios({
    url: '/moduleconf',
    data,
    method: 'delete'
  })
)

//同步打开摄像头
export const openvideo = data => (
  axios({
    url: '/openvideo',
    data,
    method: 'post'
  })
)

export const dataflow = data => (
  axios({
    url: '/dataflow',
    data,
    method: 'post'
  })
)

